import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  // 默认
  {
    path: '/',
    redirect:'/login'
  },
  // 登录
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/login/login.vue')
  },
  // 首页
      {
    path: '/home',
    name: 'home',
    meta:{title:'首页'},
    component: () => import('../views/home/index.vue'),
    children:[
// 真首页
      {
        path: '/01index',
        name: '01index',
        meta:{title:'首页'},
        component: () => import('../views/home/01index/home.vue')
      },
      {
// 个人介绍
        path: '/02show',
        name: '02show',
        meta:{title:'个人展示'},
        component: () => import('../views/home/02show/show.vue')
      },
            {
// 主要事迹
        path: '/03story',
        name: '03story',
        meta:{title:'主要事迹'},
        component: () => import('../views/home/03story/story.vue')
      },
        {
// 留言表
        path: '/05table',
        name: '05table',
        meta:{title:'留言表'},
        component: () => import('../views/home/05table/table.vue')
      },  
        
       {
// 爱好，音乐
        path: '/03music',
        name: '03music',
        meta:{title:'音乐'},
        component: () => import('../views/home/04like/03music.vue')
      },
       {
// 爱好，恐怖小说
        path: '/04novel',
        name: '04novel',
        meta:{title:'恐怖小说'},
        component: () => import('../views/home/04like/04novel.vue')
      }
        ]
      }   
]

const router = new VueRouter({
  routes
})

export default router
